﻿using System;
using System.Text;
using System.Windows.Forms;

namespace AdvancedMap
{
    public partial class Config : Form
    {
        public Config()
        {
            InitializeComponent();
            this.Text = GenFormTitle(10);
            this.TopMost = true;
        }

        public void SetGridObject(object useObject)
        {
            prpGrid.SelectedObject = useObject;
        }

        public static string GenFormTitle(int size)
        {
            StringBuilder builder = new StringBuilder();
            Random rand = new Random();
            char ch;
            for (int x = 0; x < size; x++)
            {
                ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * rand.NextDouble() + 65)));
                builder.Append(ch);
            }
            return builder.ToString().ToLower();
        }

    }
}
